package com.bluetoothsms.common;

public class MessageCalendar extends BluetoothMessage {

	public MessageCalendar(int id, CalendarEntry[] c) {
		super(BtMessageType.Calendar, null);

		mData = new String[1 + c.length * CalendarEntry.FIELD_COUNT];

		int i = 0;
		mData[i++] = String.valueOf(id);

		for (CalendarEntry entry : c) {
			mData[i++] = entry.getTitle();
			mData[i++] = String.valueOf(entry.getBeginDate().getTime());
			mData[i++] = String.valueOf(entry.getEndDate().getTime());
			mData[i++] = entry.getDescription();
			mData[i++] = String.valueOf(entry.isAllDay());
			mData[i++] = entry.getLocation();
		}
	}
}
